# coding=utf-8
"""
Author: Mr.夏末
@Function: 逻辑运算
"""
# not：取反，非
print(not (1 < 0))

# and:与,真真为真，有假为假
x = 1
print(x > 0 and x < 10)
print(True and False)

# or：或者，假假为假，有真为真
print(True or False)
print(False or False)

# 短路原则
# and短路
print(False and a)

# or短路
print(True or a)

# 优先级：not>and>or
# not先算，再算and
print(True and not False)

# and大于or:如果从左到右，最后应该要算True and a
print(True and True or True and a)
